2016-12-12

This work is released under Creative Commons

Bio

  • Teaching Assistant, Iowa State University (2011-2015)
  • M.S. in Statistics, Iowa State University (2013)
  • Internships with AT&T (2013) and Google (2014)
  • Software Developer, plotly (2015 - Present)
  • Research Assistant, Monash University (Sept 2015 - June 2016)

Future plans

Freelance software developer & data scientist

  • My clients already include: plotly, NOAA, Phronesis
  • In addition to developing plotly, I plan on delivering "data products" (e.g. interactive web apps, dynamic reports/documents, etc.)
  • Businesses already building products around plotly: Omni Analytics, TCBD Analytics

Why interactive/dynamic graphics?

  • Why interactive/dynamic graphics for presentation?
  • Why interactive/dynamic graphics for exploration?
  • Why web graphics?
    • simple to share, portable (web browser)
    • encourages composability

2016 Election Outcomes by County (source)

     County |   State | TotalVotes| Clinton| Johnson| Stein| Trump| Population|    Area
    --------| --------| ----------|--------|--------|------|------|-----------|--------
1   autauga | alabama |      24661|   0.240|   0.022| 0.004| 0.734|      54571|  594.44
2   baldwin | alabama |      94090|   0.196|   0.026| 0.005| 0.774|     182265| 1589.78
3   barbour | alabama |      10390|   0.467|   0.009| 0.002| 0.523|      27457|  884.88
4      bibb | alabama |       8748|   0.214|   0.014| 0.002| 0.770|      22915|  622.58
5    blount | alabama |      25384|   0.085|   0.013| 0.004| 0.899|      57322|  644.78
6   bullock | alabama |       4701|   0.751|   0.005| 0.002| 0.242|      10914|  622.81
7    butler | alabama |       8685|   0.428|   0.007| 0.001| 0.563|      20947|  776.83
8   calhoun | alabama |      47376|   0.279|   0.024| 0.006| 0.692|     118572|  605.87
9  chambers | alabama |      13778|   0.418|   0.012| 0.003| 0.566|      34215|  596.53
10 cherokee | alabama |      10503|   0.145|   0.014| 0.002| 0.839|      25989|  553.70
# ... with 3,101 more rows
  • Is there a relationship between population density and voting preference?

Motivating interactivity with data analysis tasks

  • Initial scatterplot revealed strange pattern in Stein votes and pop density.

  • Interactive focusing (zoom/pan) helped reveal vote proportions are rounded to the thousands.

  • Interactive identification (tooltip on mouse hover) helped reveal various details about counties.

  • Linked brushing helped reveal a strong geographic pattern in counties with no Stein votes. After some Googling, I discovered Stein was not on the ballot in these states.

  • Cook, Buja, & Swayne 2007 – propose a taxonomy of interaction (focusing, arranging, and linking views) motivated by common data analysis tasks (making comparisons, posing queries, and finding Gestalt).

Finding Gestalt & posing queries

Querying missing values

Making comparisons

TODO: eechidna?

Brushing animated views

TODO: gapminder example?

The problem with exploratory web graphics

  • Web graphics are useful for conveying information (viz is known), but often impractical for exploration (viz is unknown).

The plotly ecosystem

R packages for interactive web graphics

  • Many R packages allow you create web graphics
    • A few attempt to be general purpose
      • rCharts (Vaidyanathan et al. 2014), ggvis (Chang and Wickham 2016), rBokeh (Hafen et al. 2016)
    • Many more are domain-specific
      • leaflet (Cheng et al. 2016), dygraphs (Allaire et al. 2016), networkD3 (Gandrud et. al. 2016), DiagrammeR (Iannone et al. 2016), d3scatter (Cheng 2016)
  • Most approaches neglect/ignore linking views and animation.
    • ggvis has some linking/animation, but requires a shiny (Chang 2016) server.
    • animint (Hocking et al. 2016) supports linking/animation by extending ggplot2's grammar of graphics implementation (Wickham et al. 2017).

  • plotly (Sievert el al. 2016) borrows from and improves upon animint.
    • Also makes ggplot2 graphics interactive.
    • Provides a hook for ggplot2 extension packages.
      • See ggmosaic (Jeppson et al. 2016), geomnet (Tyner et al. 2016), and ggalt (Rudis et al. 2016).
    • Special support for ggmatrix objects – an important data structure for the GGally (Schloerke et al. 2016) package.
    • Better support for focusing (zoom/pan) and arranging views.
    • A "non-ggplot2" interface helps support visualizations not supported by ggplot2 (e.g., 3D charts).
    • Supports more complex brushing interactions
      • Make selections via mouse hover, click, click & drag.
      • Dynamically modify brush color (useful for making comparisons).

Demo

Future work

  • Keep adding documentation and examples in the plotly for R book.
  • Further advance plotly's support for linking views without shiny (obvious limitations are listed here)

  • Extensions for more popular ggplot2 extension packages such as ggrepel and ggraph.
  • Integrating plotly's support for linking tree-structures with ggraph would be particularly interesting.

Thank you